home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / xrf.com / READ.ME < prev    next >
Encoding:
Text File  |  1988-10-10  |  12.8 KB  |  168 lines

  1. /****************************************************************************
  2.  *                                                                          *
  3.  *  XRF  input file  output file  [/s]                                      *
  4.  *                                                                          *
  5.  *  Source file name: XRF_V123.C                                            *
  6.  *                                                                          *
  7.  *    DESCRIPTION:                                                          *
  8.  *                                                                          *
  9.  *                    Cross Reference & Block Structure                     *
  10.  *                    Version 1.23     October 10, 1988                     *
  11.  *                                                                          *
  12.  *    'XRF' is a cross-reference block-structure program                    *
  13.  *    written in C for C and similar languages.  It has the                 *    
  14.  *    following features:                                                   *
  15.  *                                                                          *
  16.  *    1) Single spaced cross-reference list                                 *
  17.  *                                                                          *
  18.  *    2) Block structure in output program,                                 *
  19.  *       nested blocks included                                             *
  20.  *                                                                          *
  21.  *    3) Removal of tabs in output file as some printers                    *
  22.  *       don't support them                                                 *
  23.  *                                                                          *
  24.  *    4) Strip white space from end of lines in output files                *
  25.  *                                                                          *
  26.  *    5) Works on C or Telix SALT script source files                       *
  27.  *                                                                          *
  28.  *                                                                          *
  29.  *    FUNCTIONS:                                                            *
  30.  *                                                                          *
  31.  *    Function        Description                                           *
  32.  *    --------        -----------                                           *
  33.  *    get_token       Returns a valid identifier or reserved word.          *
  34.  *    getch           Returns a character from the character buffer         *
  35.  *                     and when ready for new line prints line to file.     *
  36.  *    ungetch         Puts the character optained by getch back in          *
  37.  *                     the character buffer.                                *
  38.  *    getline         Gets a line of text from a file, removes tabs,        *
  39.  *                     and removes white space from the end of the line.    *
  40.  *    ungetline       Puts a line of text in the character buffer.          *
  41.  *    checktoken      Compares the token with Beginning and end of          *
  42.  *                     block characters.                                    *
  43.  *    in_comment      Skips over comments in a file.                        *
  44.  *    in_salt_comment Skips over comments in a SALT file.                   *
  45.  *    in_quote        Skips over quotes in a file.                          *
  46.  *    in_salt_quote   Skips over quotes in a SALT file.                     *
  47.  *    line_hdr        Puts dashes in place of leading blanks on the         *
  48.  *                     front of a line.                                     *
  49.  *    block_line_hdr  Puts block information in front of the line           *
  50.  *                     and adds a new line to the output file.              *
  51.  *    page_hdr        Puts a header on each page.                           *
  52.  *    type            Reutrns the type of character LETTER, DIGIT,          *
  53.  *                     other.                                               *
  54.  *    strsave         Saves a string in memory.                             *
  55.  *    treex           Puts tokens and line numbers in a binary tree.        *
  56.  *    treexprint      Prints out the tree to a file.                        *
  57.  *    add_line_num    Puts a linenumber in the tree at the token it         *
  58.  *                     goes with.                                           *
  59.  *    treenewline     Adds a new line of tree token and numbers to the      *
  60.  *                     output file.                                         *
  61.  *    list_alloc      Makes space for the linked list.                      *
  62.  *    tree_alloc      Makes space for the tree nodes.                       *
  63.  *                                                                          *
  64.  ****************************************************************************
  65.  *                                                                          *
  66.  *   Revision history:                                                      *
  67.  *                                                                          *
  68.  *     v1.00 by Jay B. Bronaugh - 10/12/87                                  *
  69.  *           for C Programming class @ Phoenix College                      *
  70.  *           only exists as photocopied listing                             *
  71.  *           original name CCR                                              *
  72.  *                                                                          *
  73.  *     v1.01 by Tom Goodgame - 09/25/88                                     *
  74.  *           typed in from listing using personal style                     *
  75.  *           changed declaration of character variables from int to char    *
  76.  *                                                                          *
  77.  *     v1.10 by Tom Goodgame - 09/26/88                                     *
  78.  *           added code to allow use on Telix v3.0 SALT scripts             *
  79.  *             modified get_token, added in_salt_comment & in_salt_quote    *
  80.  *           added code for output to test file during debugging            *
  81.  *             currently commented out                                      *
  82.  *                                                                          *
  83.  *     v1.20 by Tom Goodgame - 09/27/88                                     *
  84.  *           change user interface so that USAGE line is shown when there   *
  85.  *             are no parameters supplied, instead of prompting for the     *
  86.  *             file names                                                   *
  87.  *           add sensing of command line switches, first switch to be       *
  88.  *             added will be for indicating that input file is a Telix      *
  89.  *             SALT script (instead of relying on detection of SALT type    *
  90.  *             comments)                                                    *
  91.  *           fixed ALL compiler warnings                                    *
  92.  *           Added BOOLEAN type for flags (specialized int) in boolean.h    *
  93.  *                                                                          *
  94.  *     v1.21 by Tom Goodgame - 09/28/88                                     *
  95.  *           bug created by overchecking comment syntax caused "syntax"     *
  96.  *             error when faced with a divide (i.e., x/y)                   *
  97.  *                                                                          *
  98.  *     v1.22 by Tom Goodgame - 10/02/88                                     *
  99.  *           change appearance of Copyright notice                          *
  100.  *           improved variable naming                                       *
  101.  *           improved message text from errors                              *
  102.  *           changed test for /s switch so it looked for both upper and     *
  103.  *             lower case 's'.                                              *
  104.  *                                                                          *
  105.  *     v1.23 by Tom Goodgame - 10/10/88                                     *
  106.  *           get version number correct in USAGE output                     *
  107.  *                                                                          *
  108.  *     Planned for version 1.30 is auto line wrap.  Currently lines can     *
  109.  *       be 256 characters long and there is no attempt to wrap them.  The  *
  110.  *       program was originally written around a 132 character printer      *
  111.  *       width.  Input lines greater than 80 characters will run off the    *
  112.  *       edge of the paper or be wrapped by the printer.                    *
  113.  *                                                                          *
  114.  *     Planned for v2.xx will be parameter files for syntax, keywords,      *
  115.  *       etc. with a different set for each language so the program will    *
  116.  *       be useable with any language and keywords will be separated        *
  117.  *       from functions and variables.                                      *
  118.  *                                                                          *
  119.  ****************************************************************************
  120.  *                                                                          *
  121.  *     Copyright (C) 1988 by Thomas H. Goodgame, Jr. - all rights reserved  *
  122.  *                                                                          *
  123.  *     Source code and executable modules are freely useable and            *
  124.  *     distributable, subject to the following five conditions:             *
  125.  *                                                                          *
  126.  *     1)    If they are included with a commercial package, no changes      *
  127.  *          may be made to the source, they must be distributed in their    *
  128.  *          entirety, and no charge can be made for these programs.         *
  129.  *                                                                          *
  130.  *     2)    If they are distributed by a public domain/freeware/shareware   *
  131.  *          distribution organization (PC-SIG, user group, etc.) the        *
  132.  *          charge per diskette of programs must not exceed six dollars     *
  133.  *          ($6).  All files must be distributed together on one disk and   *
  134.  *          preferably in one library or archive file.                      *
  135.  *                                                                          *
  136.  *     3)    If they are distributed by BBS, no additional charges above     *
  137.  *          and beyond the connection charge (if any) may be made.  All     *
  138.  *          files must be distributed together in one library or archive    *
  139.  *          file.                                                           *
  140.  *                                                                          *
  141.  *     4)    Individuals and educational institutions may distribute these   *
  142.  *          programs without charge.  They may also modify the source for   *
  143.  *          their purposes so long as attribution is made.  They should     *
  144.  *          also indicate what the changes were, whom by, and the date.     *
  145.  *          Copyright should be asserted to prevent the code from going     *
  146.  *          public domain and then being commercialized.                    *
  147.  *                                                                          *
  148.  *     5)    Any other distribution not directly covered, must be made in    *
  149.  *          the spirit of the above conditions.                             *
  150.  *                                                                          *
  151.  *     Contact: Tom Goodgame via CompuServe UserID 76327,2053               *
  152.  *                                                                          *
  153.  *                  or                                                      *
  154.  *                                                                          *
  155.  *              Tom Goodgame via Flying Circus BBS    (602) 437-1301        *
  156.  *                               CentraLink BBS       (602) 254-9031        *
  157.  *                               Inn on the Park BBS  (602) 957-0631        *
  158.  *                               ASU Underground BBS  (602) 968-2814        *
  159.  *                               Tool Shop BBS        (602) 279-2673        *
  160.  *                                                                          *
  161.  *                  or                                                      *
  162.  *                                                                          *
  163.  *              Thomas Goodgame via Phoenix PCUG BBS  (602) 275-5558        *
  164.  *                                                                          *
  165.  *                                                                          *
  166.  ****************************************************************************/
  167.  
  168.